/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "eme_violencia")
@NamedQueries({
    @NamedQuery(name = "EmeViolencia.findAll", query = "SELECT e FROM EmeViolencia e")})
public class EmeViolencia implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "evi_id")
    private Integer eviId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 128)
    @Column(name = "evi_nombre")
    private String eviNombre;
    @Column(name = "evi_puntaje")
    private Integer eviPuntaje;
    @Basic(optional = false)
    @NotNull
    @Column(name = "evi_estado")
    private int eviEstado;
    @OneToMany(mappedBy = "emeViolencia", fetch = FetchType.LAZY)
    private List<EmeTriaje> emeTriajeList;

    public EmeViolencia() {
    }

    public EmeViolencia(Integer eviId) {
        this.eviId = eviId;
    }

    public EmeViolencia(Integer eviId, String eviNombre, int eviEstado) {
        this.eviId = eviId;
        this.eviNombre = eviNombre;
        this.eviEstado = eviEstado;
    }

    public Integer getEviId() {
        return eviId;
    }

    public void setEviId(Integer eviId) {
        this.eviId = eviId;
    }

    public String getEviNombre() {
        return eviNombre;
    }

    public void setEviNombre(String eviNombre) {
        this.eviNombre = eviNombre;
    }

    public Integer getEviPuntaje() {
        return eviPuntaje;
    }

    public void setEviPuntaje(Integer eviPuntaje) {
        this.eviPuntaje = eviPuntaje;
    }

    public int getEviEstado() {
        return eviEstado;
    }

    public void setEviEstado(int eviEstado) {
        this.eviEstado = eviEstado;
    }

    public List<EmeTriaje> getEmeTriajeList() {
        return emeTriajeList;
    }

    public void setEmeTriajeList(List<EmeTriaje> emeTriajeList) {
        this.emeTriajeList = emeTriajeList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (eviId != null ? eviId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmeViolencia)) {
            return false;
        }
        EmeViolencia other = (EmeViolencia) object;
        if ((this.eviId == null && other.eviId != null) || (this.eviId != null && !this.eviId.equals(other.eviId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.EmeViolencia[ eviId=" + eviId + " ]";
    }
    
}
